package com.rapida.pet.core;

import com.rapida.framwork.RapidActivity;

public class MainActivity extends RapidActivity {
	private PetPresenter mPetPresenter;

	@Override
	protected boolean didFinishLaunchingWithOptions() {
		MainUI mainUI = new MainUI();
		setViewController(mainUI);
		mPetPresenter = new PetPresenter(mainUI);
		mPetPresenter.startService(this);
		return true;
	}

	@Override
	protected void onResume(){
		super.onResume();
		mPetPresenter.onResume();
	}

	@Override
	protected void onPause(){
		super.onPause();
		mPetPresenter.onPause();
	}

	@Override
	protected void onStart(){
		super.onStart();
		mPetPresenter.bindService(this);
	}

	@Override
	protected void onStop(){
		super.onStop();
		mPetPresenter.unbindService(this);
	}
}